import { Navigate } from "react-router-dom"
import Home from "../components/Home"
import About from "../components/About"
import Message from "../components/Message"
import News from '../components/News'
import Detail from "../components/Detail"

export default [
  {
    path: "/home",
    element: <Home />,
    children: [
      {
        path: "news",
        element: <News/>
      },
      {
        path: "message",
        element: <Message/>,
        children: [
          // {
          //   path: 'detail/:id/:title/:content',
          //   element: <Detail/>
          // }
          {
            path: 'detail',
            element: <Detail/>
          }
        ]
      }
    ]
  },
  {
    path: "/about",
    element: <About />,
  },
  {
    path: "/",
    element: <Navigate to="/about" />,
  },
]